/**
File Name 	: MTime.c
Name, NIM	: Muqtafi Akhmad, 23512021
 **/

#include <stdio.h>
#include <stdlib.h>
#include "Time.h"

int main(int argc, char** argv) {
    // Kamus
    Time t1;
    Time t2;
    Time t3;
    int H, M, S;

    // Algoritma
    do {
        scanf("%d:%d:%d", &H, &M, &S);
    } while (!IsValidTime(H, M, S));
    (t1) = MakeTime(H, M, S);
    printf("Tercipta t1 %d:%d:%d \n", GetHour(t1), GetMin(t1), GetSec(t1));

    do {
        scanf("%d:%d:%d", &H, &M, &S);
    } while (!IsValidTime(H, M, S));
    (t2) = MakeTime(H, M, S);
    printf("Tercipta t2 %d:%d:%d \n", GetHour(t2), GetMin(t2), GetSec(t2));
    printf("is i1 equals t2? %d \n", EqTime(t1, t2));
    t3 = AddTime(t1, t2);
    printf("hasil penjumlahannya %d:%d:%d \n", GetHour(t3), GetMin(t3), GetSec(t3));
    AccTime(&t1, t2);
    printf("hasil penjumlahannya %d:%d:%d \n", GetHour(t1), GetMin(t1), GetSec(t1));
    return (EXIT_SUCCESS);
}

